Version

CreateCollectionChange<T>(ICollection<T>,NotifyCollectionChangedAction,T[],Int32,String) Method

Creates an UndoUnit for an Add/Remove operation of multiple items.
Syntax
'Declaration
 
Public Overloads Overridable Function CreateCollectionChange(Of T)( _
   ByVal collection As ICollection(Of T), _
   ByVal action As NotifyCollectionChangedAction, _
   ByVal items() As T, _
   ByVal index As Integer, _
   ByVal itemTypeDisplayName As String _
) As UndoUnit
public virtual UndoUnit CreateCollectionChange<T>( 
   ICollection<T> collection,
   NotifyCollectionChangedAction action,
   T[] items,
   int index,
   string itemTypeDisplayName
)

Parameters

collection
The collection that was modified
action
Either 'Add' or 'Remove' to indicate the type of operation that occurred
items
The item that were added or removed
index
The index of the new item for an Add operation or the index where the item existed for a Remove operation.
itemTypeDisplayName
A string representing the type of items in the collection as they should be presented to the end user or null to use the type name and/or item.

Type Parameters

T
The type of item in the collection

Return Value

An UndoUnit that can be used to undo the operation
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also